package com.dys.testpolymorphic;

/**
 * @className: com.dys.testpolymorphic.Girl
 * @description: com.dys.testpolymorphic
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/07/20 下午11:24
 */
public class Girl {

    // public void play(Cat cat){
    //     cat.shout();
    // }
    // public void play(Dog dog){
    //     dog.shout();
    // }

    // 小女孩跟小动物玩
    public void play(Animal animal) {
        animal.shout();
    }
}
